package com.ly.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * @author 李岩
 * @date 2022/1/12-16:44
 * @describe
 */
@Controller
@RequestMapping("user")
public class ProductController {

    @RequestMapping("loginName")
    @ResponseBody
    public String loginName(HttpServletRequest request){

        String loginName = request.getRemoteUser();
        return "欢迎"+loginName;

    }
}
